package com.zyd.blog.persistence.mapper;

import com.zyd.blog.persistence.beans.Comment;
import com.zyd.blog.persistence.beans.CommentId;
import com.zyd.blog.persistence.beans.CommentNew;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.BaseMapper;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author liusongqi
 * @since 2020-02-11
 */
@Repository
public interface CommentMapper extends BaseMapper<Comment> {
    List<CommentNew> threeComment(@Param(value = "answerId") String answerId, @Param(value = "state") String state,  @Param(value = "userId") String userId);
    List<CommentNew> comment(@Param(value = "answerId") String answerId, @Param(value = "state") String state, @Param(value = "userId") String userId);
    List<Comment> HTcomment(@Param(value = "answerId") String answerId,String state);
    CommentNew Reply(@Param(value = "commentId") String commentId, @Param(value = "state") String state, @Param(value = "userId") String userId);

    Integer fabulous(@Param(value = "commentId") String commentId);

    Integer reduceZan(@Param(value = "commentId") String commentId);

    Integer deleteComment(@Param(value = "commentId") String commentId);

    Integer deleteCommentReply(@Param(value = "commentId") String commentId);

    Integer countComment(@Param(value = "commentId") String commentId);

    Integer jianComment(@Param(value = "commentId") String commentId);

    List<CommentId> commentAll(String id);

    List<Comment> stopUserAll(String userId);

    Integer stopUser(String userId);

    Integer passUser(String userId);

    Integer hide(String id);

    Integer noHide(String id);

    Integer num(String id,String userId);
}
